package btree;

import heap.InvalidSlotNumberException;

import java.io.IOException;

import bufmgr.HashEntryNotFoundException;
import bufmgr.InvalidFrameNumberException;
import bufmgr.PageUnpinnedException;
import bufmgr.ReplacerException;


/**
 * Base class for a index file scan
 */
public abstract class IndexFileScan 
{
  /**
   * Get the next record.
   * @return the KeyDataEntry, which contains the key and data
   */
  abstract public KeyDataEntry get_next();

	/**
	 * Delete the current record.
	 * 
	 * @throws IOException
	 * @throws ConvertException
	 * @throws NodeNotMatchException
	 * @throws KeyNotMatchException
	 * @throws InvalidFrameNumberException
	 * @throws HashEntryNotFoundException
	 * @throws PageUnpinnedException
	 * @throws ReplacerException
	 * @throws ConstructPageException
	 * @throws InvalidSlotNumberException
	 * @throws DeleteRecException
	 */
   abstract public void delete_current() throws KeyNotMatchException, NodeNotMatchException, ConvertException, IOException, ReplacerException, PageUnpinnedException, HashEntryNotFoundException, InvalidFrameNumberException, ConstructPageException, InvalidSlotNumberException, DeleteRecException;

  /**
   * Returns the size of the key
   * @return the keysize
   */
  abstract public int keysize();
}
